package campusguide;

import java.util.Objects;

public class Port {
    long id;
    double posX;
    double posY;
    int hierarchy;
    String name;
    String intro;
    String attachments;

    Port(long id, double posX, double posY, int hierarchy) {
        this.id = id;
        this.posX = posX;
        this.posY = posY;
        this.hierarchy = hierarchy;
    }

    public Port(long id, double posX, double posY, int hierarchy, String name, String intro, String attachments) {
        this.id = id;
        this.posX = posX;
        this.posY = posY;
        this.hierarchy = hierarchy;
        this.name = name;
        this.intro = intro;
        this.attachments = attachments;
    }

    public double getPosX() {
        return posX;
    }

    public void setPosX(double posX) {
        this.posX = posX;
    }

    public double getPosY() {
        return posY;
    }

    public void setPosY(double posY) {
        this.posY = posY;
    }

    public int getHierarchy() {
        return hierarchy;
    }

    public void setHierarchy(int hierarchy) {
        this.hierarchy = hierarchy;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getAttachments() {
        return attachments;
    }

    public void setAttachments(String attachments) {
        this.attachments = attachments;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Port port = (Port) o;
        return id == port.id;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
